<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:if test="${code==1}">
	<form id="pagerForm" method="post"
		action="SmsRecordAction.action?toResult=searchSmsRecord&rightId=${rightId}">
		<input type="hidden" name="pageNum" value="${page.currentPage }" /> <input
			type="hidden" name="pageSize" value="${page.pageSize }" /> <input
			type="hidden" name=sendMobile value="${sendMobile }" />
	</form>



	<form onsubmit="return navTabSearch(this);"
		action="SmsRecordAction.action?toResult=searchSmsRecord&rightId=${rightId}"
		method="post">
		<div class="pageHeader">
			<input type="hidden" name="init" value=0>
			<div class="searchBar">
				<table class="searchContent">
					<tr>
						<td>电话: <input type="text" name="sendMobile"
							value="${sendMobile}" />
						</td>

						<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td>
							<div class="buttonActive">
								<div class="buttonContent">
									<button type="submit">检索</button>
								</div>
							</div>
						</td>
					</tr>
				</table>
			</div>
		</div>

		<div class="pageContent">
			<table class="list" layoutH="118" targetType="dialog" width="100%">
				<thead>
					<tr>
						<th align="center">序号</th>
						<th align="center">IP地址</th>
						<th align="center">电话</th>
						<th align="center">类型</th>
						<th align="center">短信内容</th>
						<th align="center">创建时间</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator var="smsRecord" value="page.data" status="st">
						<tr target="sid_support" rel="<s:property value="#smsRecord.id" />">
							<th width="1%" align="center"><s:property
									value="page.pageSize * (page.currentPage-1) + #st.index + 1" />
							</th>
							<th width="3%" align="center"><s:property value="#smsRecord.sendIp" />
							</th>
							<th width="3%" align="center"><s:property value="#smsRecord.sendMobile" />
							</th>
							<th width="3%" align="center">
								<s:if test="#smsRecord.sendType == 1">
									短信验证码
								</s:if> 
								<s:elseif test="#smsRecord.sendType == 0">
									测试数据
								</s:elseif> 
								<s:elseif test="#smsRecord.sendType == 2">
									语音验证码
								</s:elseif> 
								<s:elseif test="#smsRecord.sendType == 3">
									订单通知
								</s:elseif> 
								<s:elseif test="#smsRecord.sendType == 1000">
									其他短信
								</s:elseif>
							</th>
							<th width="3%" align="left"><s:property value="#smsRecord.sendContent" />
							</th>
							<th width="3%" align="center"><s:date name="#smsRecord.createTime" format="yyyy-MM-dd HH:mm:ss" />
							</th>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<div class="panelBar">
				<div class="pages">
					<span>共${page.totalNum }条，共${page.totalPage }页</span>
				</div>
				<div class="pagination" targetType="navTab"
					totalCount="${page.totalNum }" numPerPage="${page.pageSize }"
					pageNumShown="10" currentPage="${page.currentPage }"></div>
			</div>
		</div>
	</form>
</c:if>
<c:if test="${code==0}">
	${message}
</c:if>


